import java.math.BigDecimal;

/**
 * 
 * @author darin
 *Represents sourcs and sinks
 */
public abstract class Transaction
{
	String name;
	Account account;
	double rate;
	
	public Transaction(String name, Account account, double rate)
	{
		this.name = name;
		this.account = account;
		this.rate = rate;
	}

	/**
	 * @return the name
	 */
	public final String getName()
	{
		return name;
	}

	/**
	 * @param name the name to set
	 */
	public final void setName(String name)
	{
		this.name = name;
	}

	/**
	 * @return the account
	 */
	public final Account getAccount()
	{
		return account;
	}

	/**
	 * @param account the account to set
	 */
	public final void setAccount(Account account)
	{
		this.account = account;
	}

	/**
	 * @return the rate
	 */
	public final double getRate()
	{
		return rate;
	}

	/**
	 * @param rate the rate to set
	 */
	public final void setRate(double rate)
	{
		this.rate = rate;
	}
	
	// override in subclass to determine what this class does each time tick
	public abstract void doTimeTick();
	
	

}
